package org.jeecg.modules.rental.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Description: 账户卡券
 * @Author: sean
 * @Date:   2024-08-19
 * @Version: V1.0
 */
@Data
@TableName("rental_account_coupon")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="rental_account_coupon对象", description="账户卡券")
public class RentalAccountCoupon implements Serializable {
    private static final long serialVersionUID = 1L;

	/**代金券id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "代金券id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @Excel(name = "订单id", width = 15)
    @ApiModelProperty(value = "订单id")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;
	/**代金券编号*/
	@Excel(name = "代金券编号", width = 15)
    @ApiModelProperty(value = "代金券编号")
    private String couponCode;
    /**代金券编号*/
    @Excel(name = "代金券类别", width = 15)
    @ApiModelProperty(value = "代金券类别")
    private String couponCategory;
	/**代金券拥有者*/
	@Excel(name = "代金券拥有者", width = 15)
    @ApiModelProperty(value = "代金券拥有者")
    private String accountId;
	/**代金券配置*/
	@Excel(name = "代金券配置", width = 15)
    @ApiModelProperty(value = "代金券配置")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long configId;
    /**代金券配置*/
    @Excel(name = "代金券配置名称", width = 15)
    @ApiModelProperty(value = "代金券配置名称")
    private String configName;
    /**代金券配置*/
    @Excel(name = "代金券配色", width = 15)
    @ApiModelProperty(value = "代金券配色")
    private String couponColor;
    /**使用门槛金额 0-无门槛*/
    @Excel(name = "使用门槛金额", width = 15)
    @ApiModelProperty(value = "使用门槛金额")
    private BigDecimal minAmount;
    /**满减金额*/
    @Excel(name = "面值(抵扣券需要)", width = 15)
    @ApiModelProperty(value = "面值(抵扣券需要)")
    private BigDecimal faceValue;
    /**领券时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "领券时间")
    private LocalDateTime receiveTime;
    /**使用时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "使用时间")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private LocalDateTime useTime;
	/**失效日期*/
	@Excel(name = "失效日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "失效日期")
    private LocalDate expiryDate;
	/**0-未使用 1-已使用 3-已失效*/
	@Excel(name = "0-未使用 1-已使用 3-已失效", width = 15)
    @ApiModelProperty(value = "0-未使用 1-已使用 3-已失效")
    private String status;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private LocalDateTime createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private LocalDateTime updateTime;
	/**是否删除（0：否、1：是）*/
	@Excel(name = "是否删除（0：否、1：是）", width = 15)
    @ApiModelProperty(value = "是否删除（0：否、1：是）")
    @TableLogic(value="0", delval = "1")
    private String isDelete;

}
